import { scene } from "./3d.js";

function footer() {
  var width = window.innerWidth;
  var height = window.innerHeight;
  var k = width / height;
  var s = 200; //物体远近
  var camera = new THREE.OrthographicCamera(-s * k, s * k, s, -s, 1, 1000); //相机对象
  camera.position.set(100, 300, 200); //相机位置
  camera.lookAt(scene.position);
  var renderer = new THREE.WebGLRenderer();
  renderer.setSize(width, height);
  renderer.setClearColor(0x00ff00, 1);
  document.body.appendChild(renderer.domElement);
  render();

  var controls = new THREE.OrbitControls(camera, renderer.domElement);
  controls.addEventListener("change", render);
  function render() {
    renderer.render(scene, camera); //执行渲染操作
  }
}

export default footer;
